import { request, excelRequest } from "../request";

export function getSplitRelation(params) {
  // 分账关系列表
  return request({
    url: `/product/v31/api/merSplitRela/page`,
    method: "POST",
    params: params,
    headers: {
      token: sessionStorage.getItem("token"),
    },
  });
}

export function getMerSplitChannelInfo(id) {
  // 查询开通分账商户支付通道详情
  return request({
    url: "/product/v31/api/merchant/channel/info/" + id,
    method: "GET",
    headers: {
      // "Content-Type":'application/json',
      token: sessionStorage.getItem("token"),
    },
  });
}

export function saveMerSplitRelaController(data) {
  // 新增商户分账关系
  return request({
    url: "/product/v31/api/merSplitRela/save",
    method: "post",
    data,
    headers: {
      token: sessionStorage.getItem("token"),
    },
  });
}

export function deletMerSplitRelaController(id) {
  // 删除分账关系
  return request({
    url: "/product/v31/api/merSplitRela/delete/" + id,
    method: "post",
    headers: {
      token: sessionStorage.getItem("token"),
    },
  });
}